package com.sq.foursm.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;

import com.sq.foursm.entity.SecUser;
import com.sq.foursm.entity.SecUserExample;
import com.sq.foursm.entity.SecUserExample.Criteria;
import com.sq.foursm.mapper.SecUserMapper;
import com.sq.foursm.service.TestService;

public class TestServiceImpl implements TestService {
	@Resource
	private SecUserMapper  secUserMapper;
	
	public String testservicer() {
		SecUserExample secUserExample = new SecUserExample();
		Criteria createCriteria = secUserExample.createCriteria();
//		SecUser secUser = new SecUser();
//		secUser.setUserName("sq");
		createCriteria.andUserNameEqualTo("sq");
		List<SecUser> selectByExample = secUserMapper.selectByExample(secUserExample);
		SecUser secUser = selectByExample.get(0);
		return secUser.getPassword();
		
	}

	public SecUserMapper getSecUserMapper() {
		return secUserMapper;
	}

	public void setSecUserMapper(SecUserMapper secUserMapper) {
		this.secUserMapper = secUserMapper;
	}
	

}
